#include <cstdlib>
#include <iostream>

int main()
{
    std::string command = "curl -u username:password ftp://ftp.example.com/path/to/file -o local_file";
    int result = system(command.c_str());
    if (result == 0)
    {
        std::cout << "File downloaded successfully." << std::endl;
    }
    else
    {
        std::cerr << "Failed to download file." << std::endl;
    }
    return 0;
}